/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.jm.acionista.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author joao
 */
@Entity
@Table(name = "cep_uf", catalog = "acionista", schema = "dbo")
@NamedQueries({
    @NamedQuery(name = "CepUf.findAll", query = "SELECT c FROM CepUf c")})
public class CepUf implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "cod_uf", nullable = false, length = 2)
    private String codUf;
    @Basic(optional = false)
    @Column(name = "dsc_estado", nullable = false, length = 50)
    private String dscEstado;

    public CepUf() {
    }

    public CepUf(String codUf) {
        this.codUf = codUf;
    }

    public CepUf(String codUf, String dscEstado) {
        this.codUf = codUf;
        this.dscEstado = dscEstado;
    }

    public String getCodUf() {
        return codUf;
    }

    public void setCodUf(String codUf) {
        this.codUf = codUf;
    }

    public String getDscEstado() {
        return dscEstado;
    }

    public void setDscEstado(String dscEstado) {
        this.dscEstado = dscEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codUf != null ? codUf.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CepUf)) {
            return false;
        }
        CepUf other = (CepUf) object;
        if ((this.codUf == null && other.codUf != null) || (this.codUf != null && !this.codUf.equals(other.codUf))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.jm.acionista.entity.CepUf[ codUf=" + codUf + " ]";
    }
}
